@extends('backend.layouts.main')
@section('content')
<section class="content-header">
    <h1>
        私教列表
        <small>私教列表</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{URL('admin/index')}}"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li class="active"><a href="{{URL('admin/user')}}">私教列表</a></li>
    </ol>

</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                {!!view("backend.user._search",['request'=>$request])->render()!!}
                <!-- /.box-header -->
                <div class="box-body  table-responsive">
                    <table class="table table-striped table-bordered">
                        <thead>
                            <tr>
                                <th style="width: 10px">#</th>
                                <th>姓名</th>
                                <th>用户名</th>
                                <th>手机号</th>
                                <th>预约次数</th>
                                <th>教练等级</th>
                                <th>状态</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        @if(!empty($userDatas[0]->id))
                        @foreach($userDatas AS $key=>$userData)
                        <tr style="color:#888;font-weight:normal">
                            <td></td>
                            <td style="cursor:pointer" 
                                onclick="iframe('详情', 'user/{{encryptionUrl($userData->id)}}')">
                                {{$userData->name}}
                            </td>
                            <td>{{$userData->username}}</td>
                            <td>{{$userData->phone}}</td>
                            <td>{{$userData->by_number}}</td>
                            <td>{{$userData->level}}</td>
                            <td>
                                @if($userData->status==0)
                                <span class="label label-danger">禁用</span>
                                @else
                                <span class="label label-success">正常</span>
                                @endif
                            </td>
                            <td>{{$userData->created_at}}</td>
                            <td>
                                <a type="button" href="user/{{encryptionUrl($userData->id)}}/edit"  class="btn btn-info btn-sm"><i class="fa fa-edit "></i> 修改</a>
                                <!--<a type="button" href="user/{{$userData->id}}" class="btn btn-warning btn-sm"><i class="fa fa-hand-paper-o"></i>审核</a>-->
                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr style="color:#888;font-weight:normal">
                            <td colspan="8" align="center">暂无数据</td>
                        </tr>
                        @endif
                    </table>
                </div>
                {!!view("backend.common._page",['datas'=>$userDatas,'request'=>$request])->render()!!}
            </div>
        </div>
    </div>
</section>
{!!view("backend.common.status")->render()!!}
@endsection